// import express from "express";
// const router = express.Router();
// import formidable from "formidable";
// import path from "path";
// import SystemController from "../../controller/system";

//#region 上传文件
// router.post("/upload", (req, res, next) => {
//   const form = formidable({
//     uploadDir:  path.resolve(__dirname, "../../public/upload"),
//   });
//   form.parse(req, (err, fields, files) => {
//     if (err) return next(err);
//     res.json({ fields, files });
//   });
// });

// class System {
//   //#region 上传文件
//   upload(req: express.Request, res: express.Response, next: express.NextFunction): void {
//     const form = formidable({
//       uploadDir: path.resolve(__dirname, "../../public/upload"),
//     });
//     form.parse(req, (err, fields, files) => {
//       if (err) return next(err);
//       res.json({ fields, files });
//     });
//   }
//   //#endregion


// }

